package com.ruicar.afs.cloud.account.common.feign;

import com.ruicar.afs.cloud.common.core.feign.annotations.AfsFeignClear;
import com.ruicar.afs.cloud.common.core.util.IResponse;
import com.ruicar.afs.cloud.common.modules.dto.voucher.VoucherBusinessDataDto;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestHeader;

import java.util.Map;

/**
 * @author infinity
 * @version 1.0
 *
 * @date 2020/7/2 9:54
 */
@FeignClient(name = "voucherCase", url = "${com.greatwall.services.case-service.url}")
public interface VoucherCaseApiFeign {
    /**
     * @param dto
     * @return
     */
    @ApiOperation("获取业务数据API接口")
    @PostMapping(value = "/voucher/get")
    @AfsFeignClear(true)//通过此注解防止添加内部token
    IResponse<VoucherBusinessDataDto> get(@RequestBody @Validated  VoucherBusinessDataDto dto, @RequestHeader Map<String, String> headers );

}
